#include <iostream>
#include "namespace.h"

namespace pers
{
	using std::cout;
	using std::cin;

	void getperson(person & rp)
	{
		cout << "Enter first name: ";
		cin >> rp.fname;
		cout << "Enter last name: ";
		cin >> rp.lname;
	}

	void showperson(const person & rp)
	{
		std::cout << rp.lname << ", " << rp.fname;
	}
}

namespace debts
{
	void getdebt(debt & rd)
	{
		getperson(rd.name);
		std::cout << "Enter debt: ";
		std::cin >> rd.amount;
	}

	void showdebt(const debt & rd)
	{
		showperson(rd.name);
		std::cout << ": $" << rd.amount << std::endl;
	}

	double sumdebts(const debt ar[], int n)
	{
		double total = 0; 
		for (int i = 0; i < n; i++)
			total += ar[i].amount;

		return total;
	}
}

int main()
{
	
	return 0;
}
